FROM alpine
MAINTAINER ipcun.com
ENV ROOT_PASSWORD root
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
	&& apk update \
	&& apk add --no-cache openssh-server openssh-sftp-server tzdata openrc\
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
	&& sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/g'  /etc/ssh/sshd_config \
	&& ssh-keygen -A \
	&& echo "root:ipcun" | chpasswd \
   	&& mkdir -p /run/openrc \
	&& touch /run/openrc/softlevel \
	&& rc-update add sshd 
EXPOSE 22
ENTRYPOINT ["tail"]